home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Grab Bag
/
Shareware Grab Bag.iso
/
002
/
merge.lqr
/
MERGEP.BAS
< prev
next >
Wrap
BASIC Source File
|
1985-06-03
|
896b
|
24 lines
1 REM save"mergep",a
10 REM print merger
20 PRINT "Print Merger.. by Keith Peterson "
30 INPUT"text file to read";TF$
40 INPUT"data file to read";DF$
50 OPEN DF$ FOR INPUT AS #2
55 IF LD THEN PRINT"End of data: "T" pages printed":SYSTEM
60 OPEN TF$ FOR INPUT AS #1
70 GOSUB 1000 : IF LT THEN T=T+1:GOSUB 1100 : CLOSE #1: GOTO 55
80 GOSUB 900
90 GOTO 70
900 DS$="":IF LD THEN PRINT"End of data encountered":SYSTEM
901 D$=INPUT$(1,2):LD = EOF(2):REM PRINT ASC(D$)
902 IF (D$=CHR$(10) OR D$=CHR$(0)) AND LD=0 THEN 901
905 IF D$=CHR$(13) OR D$=CHR$(7) OR D$="," OR LD THEN PRINT DS$;:RETURN
910 DS$=DS$+D$:GOTO 901
1000 D$=INPUT$(1,1):LT = EOF(1):IF D$=CHR$(10) AND LT=0 THEN 1000
1010 IF D$="^" OR LT THEN RETURN
1020 PRINT D$;: GOTO 1000
1100 PRINT CHR$(12);:RETURN
):IF D$=CHR$(10) AND LT=0 THEN 1000
1010 IF D$="^" OR LT THEN RETURN
1020 PRINT D$;: GOTO 1000
1100 PRINT CH